package com.pureut.order.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pureut.order.domain.OrderSupplierManagement;
import com.pureut.order.domain.PullDown;
import com.pureut.order.dto.CustomerManagementDto;
import com.pureut.order.dto.OrderSupplierManagementDto;
import com.pureut.order.export.OrderSupplierManagementExport;
import com.pureut.order.vo.OrderSupplierManagementVo;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.order.api.dto.CustomerBalance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 供应商mapper
 */
@Mapper
public interface OrderSupplierManagementMapper extends BaseMapperPlus<OrderSupplierManagementMapper, OrderSupplierManagement, OrderSupplierManagement> {

    /**
     * 供应商管理列表
     */
    Page<OrderSupplierManagementDto> getAllList(@Param("page") Page<CustomerManagementDto> page, @Param("orderSupplierManagementVo") OrderSupplierManagementVo orderSupplierManagementVo);

    /**
     * 查询供应商编号
     */
    List<OrderSupplierManagementDto> getSupplierNumMax();

    /**
     * 供应商数据导出
     */
    List<OrderSupplierManagementExport> getExportList(OrderSupplierManagementVo orderSupplierManagementVo);

    /**
     * 通过多个id获取数据
     */
    List<OrderSupplierManagementExport> getDataByIdStr(@Param("idList") List<String> idList);

    /**
     * 获取去启用状态供应商
     */
    List<OrderSupplierManagementDto> getOpenSupplierList();

    /**
     * 通过单个id获取数据
     */
    OrderSupplierManagementDto getSupplierById(Long id);



    /**
     * 根据编码获取供应商信息
     */
    OrderSupplierManagementDto selectByCode(String code);

    /**
     * 通过供应商名称获取供应商编码(财务模块使用)
     */
    String getCodeBySupplierName(String supplierName);

    /**
     * 供应商下拉
     */
    List<PullDown> supplierPullDown();

    /**
     * 更新供应商余额(财务模块使用)
     */
    boolean updateSupplierBalance(CustomerBalance customer);
}
